Skip to content

fix(metadata-protocol)!: the metadata lists serve nothing a disabled package's customization pair or a dependent's added bundle member carries for it (ADR-0150 D3) - #33405

Draft
objectstack-fleet[bot] wants to merge 6 commits into
mainfrom
claude/area-E1-32354
Draft

objectstack-fleet[bot] wants to merge 6 commits into
mainfrom
claude/area-E1-32354

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Elon · project thread

Fixes #32354

Clause-②: no (narrowing)
Metadata-protocol: none
Skills-docs: none — skills/** and content/docs/** teach that a disabled module is hidden (content/docs/deployment/marketplace-handbook.mdx) and never teach a list serving a disabled package's customization or a dependent's addition to its bundle, so no taught sentence moves.

BREAKING (ADR-0087 not-required (no-migration-prescription)): while a package is disabled, the metadata lists no longer serve the rows its customization pair stores for its names, nor a dependent's added bundle member of them. Area-lease pilot #33059, area E1. The list-door remainder of this card: PR #33130 (merged) did the bare, exact and layered reads.

维护者速读

  • 改了什么:某个包停用后,元数据列表不再列出它的定制包(包名.custom)为它的名字存的行,也不再列出依赖它的包给它的邮件模板追加的语言版本。涉及:不指名包的列表及其执行列表、指名停用包的列表、指名其定制包的列表。不指名包的发信读的就是这个执行列表,所以也不再发出这两类内容。
  • 为什么改:专题 ADR-0150 D3「停用的包不持有任何名字」。按名读取早已对这些地址答 404,列表却还按注册和保存顺序列出它们;停用一个包应在每个读门上都消失(epic note 6820147040)。
  • 风险与回滚:只在有包被停用时生效,没有包停用时所有列表与之前完全相同;依赖包自己的地址(?package=DEP)仍列出它追加的语言。过渡期内从依赖包本身发信(读不指名列表)在基础包停用时找不到该语言,等 ADR-0150: the email template send judges the served holders (a disabled package holds no name at the send) #32670 让发信按在用持有者判定后恢复。回滚即 revert 本 PR,不改任何存储数据。
  • 先看:packages/metadata-protocol/src/protocol-meta-list-reads.ts 的 disabledHolderListing(新增谓词,'unscoped' 分支里依赖包追加的判定)以及它在停用过滤处的调用。
  • 两分钟验证:pnpm --filter @objectstack/objectql exec vitest run src/package-scoped-exact-qualifier.test.ts -t 32354,预期 14 例全过。
  • 需要你做的:无,席位落地

What changes

One function, in @objectstack/metadata-protocol's list read (readFlattenedMetaItems), next to the existing disabled-package filter, on the effective and execution faces only (the per-package layer, which the package export reads, keeps a disabled package's items as before):

  • disabledHolderListing(host, type) answers whether an item the list serves at a package is a disabled holder's. It is undefined (nothing moves) for a type the registry does not read by package and while no installed package is disabled.
    • A list scoped to a package serves no name whose exact read at that package is a disabled package's withheld item. The predicate is the exact read's own, disabledExactAddressHolder (protocol-exact-qualifier.ts, unchanged): the package is disabled, or it is a customization pair whose every base holding the name is.
    • The list naming no package leaves out an item whose own package's address is withheld that way (a disabled holder's pair row), and, for a bundle (ITEM_KEY_DISCRIMINATORS), an addition to a disabled holder's bundle: the item's package holds the name only as an addition (the registry's holders read as any other caller leave it out, read as itself keep it) and every holder in its declared dependency closure is disabled. Every holder is read with includeDisabledPackages, so a disable never promotes an addition to a holder.

Moved answers

Measured over a real SchemaRegistry and ObjectStackProtocolImplementation, on 2b2e5b41 (FROM: #33251's head, main plus #32606) and on this branch: A ships welcome in en-US; A's pair A.custom stores a fr-FR row of it, or DEP (depends on A) ships a fr-FR addition; with one holder, or beside B, an enabled second holder of welcome. Both registration orders, the pair row stored before and after the registrations. A disabled:

read FROM TO
getMetaItems / getMetaItemsForExecution, no package (GET /meta/email_template) the pair's fr-FR row, or DEP's fr-FR (beside B's en-US with two holders) neither (B's en-US only with two holders, else nothing)
the same, ?package=A the pair's fr-FR row []
?package=A.custom the pair's fr-FR row not listed
a send naming no package, fr-FR (createRegistryEmailTemplateLoader over the protocol) the pair's row, or DEP's member no template
a send from DEP, fr-FR DEP's member no template (declared; see below)

Not moved. With nothing disabled every list answers as on FROM (CONTROL in every pin). ?package=DEP keeps DEP's fr-FR, as ?package=DEP&member=fr-FR serves it. ?package=B and B's items, the pair's own item of a name A ships nothing of (CONTROL, both orders), the per-package layer, and every by-name read answer as before. Re-enabling A restores every list (asserted in every pin).

Declared interim move. A send from DEP itself resolves to the list naming no package for this name (bundleAddressOf finds one holder), so it no longer finds DEP's fr-FR while A is disabled. #32670 (the send judges the served holders, nested under this card and landing after it) reads such a send at DEP's own address, which keeps the member.

Red lines

  1. Resolution never loosened. Only items leave lists, and only items the by-name read of the same address already withholds. Nothing refused or absent is now served.
  2. Ambiguity reported, never guessed. The answer no longer depends on registration or save order: every pin runs both orders and both save orders, and reads twice after the first read hydrated the stored row.
  3. Independently releasable. No stored row, key or export changes; it moves nothing while no package is disabled, and re-enabling restores every answer.

Tests

  • packages/objectql/src/package-scoped-exact-qualifier.test.ts, top-level [#32354] the list doors serve nothing a disabled holder's pair or dependent carries for it (real registry and protocol, environmentId unset so the list hydrates rows): 12 cases (four states × both registration orders × both save orders for the pair row) asserting seven lists with nothing disabled, A disabled (read twice), and A re-enabled; plus 2 CONTROLs for the pair's own item.
  • packages/rest/src/meta-disabled-package-doors.test.ts, [#32354] RestServer: the list doors and the send naming no package beside a disabled holder (an environment-scoped protocol): GET /meta/email_template unscoped and with package= A, A.custom, DEP through the RestServer route, and the email loader's send with no package and from DEP; 6 cases.

Acceptance notes

Verification

Head 333edb0868 (this branch with origin/main 87330e8959 merged).

Pins and ablations
  • objectql src/package-scoped-exact-qualifier.test.ts -t 32354: 14 passed. REST src/meta-disabled-package-doors.test.ts: 47 passed (the 6 new cases among them).
  • Ablations (source changed with scripts/ablation-replace.mjs, @objectstack/metadata-protocol rebuilt under the verify lock, ablation-dist-preflight saw the marker in dist/, then restored: git diff HEAD empty, rebuilt, marker --absent exit 0):
    • A1, the exact-address arm off (disabledExactAddressHolder never withholds): objectql 8 failed (every pair-row case: one and two holders, both orders, both save orders), 6 passed (the four addition cases and both CONTROLs); REST 4 failed (every pair-row case), 43 passed.
    • A2, the addition arm off (bases.every(disabled) never true): objectql 4 failed (every addition case), 10 passed; REST 2 failed (both addition cases), 45 passed.
    • A first A2 attempt never reached the lock (queue-timeout), so the preflight refused (marker absent from dist/) and its green run was discarded; the rerun above is the leg.
Package tests, typecheck, lint
  • turbo run test --concurrency=2 --continue over the affected set against main (82 packages, @objectstack/dogfood left to its own battery), under the verify lock: stopped on the area lead's order once it held the lock too long, after 68 packages had finished, with 0 failed test files. Among them @objectstack/metadata-protocol 339 files passed (9 skipped), @objectstack/objectql 595, @objectstack/rest 410, @objectstack/runtime 599, @objectstack/cli 637 (2 skipped), @objectstack/plugin-email 53. The rest of the set (UI packages) is CI's Test Core.
  • pnpm --filter metadata-protocol, objectql, rest run typecheck: exit 0 (VERDICT command-exit 0).
  • pnpm lint: exit 0.
  • NOT MEASURED locally: the full dogfood battery (owed by the (narrowing) arm; not run, because the shared lock was the bottleneck and the area lead asked for the narrowed pre-push set; the queue's Dogfood Regression Gate runs it), and the derived gate families (CI's Lint & Repo Gates).

🤖 Generated with Claude Code

https://claude.ai/code/session_016WV4cy1y7UNVbT2QAdmgdn

… the name is never another package's moved edit (ADR-0150 D4)
…s the name at a bundle addition; changesets and ADR-0087 entry
…air row and a dependent's addition to its bundle (ADR-0150 D3)

Claude-Session: https://claude.ai/code/session_016WV4cy1y7UNVbT2QAdmgdn
Co-authored-by: Claude <noreply@anthropic.com>
…w and a dependent's addition, both orders

Claude-Session: https://claude.ai/code/session_016WV4cy1y7UNVbT2QAdmgdn
Co-Authored-By: Claude <noreply@anthropic.com>
… a disabled holder; changeset

Claude-Session: https://claude.ai/code/session_016WV4cy1y7UNVbT2QAdmgdn
Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

2 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run.

What this run could not see
  • the SDK route bridge reached 65 of 247 client-bound route-ledger rows — the other 182 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 182: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 123 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 10 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json e0ce1b523c9cdb625211fc866593f57aee9223ee → packageMentionDocs.

Which tree this was computed on

This run read content/docs from b60c98e3e5758b90749a1ce886f7cdae6e5cd4d5 — the merge of head 333edb086831ca104cb791040018ee46a5ba7809 into base e0ce1b523c9cdb625211fc866593f57aee9223ee, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin b60c98e3e5758b90749a1ce886f7cdae6e5cd4d5 && git checkout b60c98e3e5758b90749a1ce886f7cdae6e5cd4d5
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin e0ce1b523c9cdb625211fc866593f57aee9223ee 333edb086831ca104cb791040018ee46a5ba7809 && git checkout -B drift-repro e0ce1b523c9cdb625211fc866593f57aee9223ee && git merge --no-ff 333edb086831ca104cb791040018ee46a5ba7809

node scripts/docs-audit/affected-docs.mjs --json e0ce1b523c9cdb625211fc866593f57aee9223ee

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · os-elon-musk · session_016WV4cy1y7UNVbT2QAdmgdn

Request: review · area E1 · head 333edb0 · 2026-11-14T18:54Z

Fixes #32354 (ADR-0150 D3, list doors): the metadata lists serve nothing a disabled package's customization pair or a dependent's added bundle member carries for it. Declares a narrowing (BREAKING); the dependent's own send losing its added locale while the base is disabled is declared and restored by #33385 / #32670. Local dogfood not measured (verify lock); the merge queue's dogfood shards run it. Reviewer: review#1.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Contract-review-claim: session_016WV4cwxS1ZpSu2hAMRcqbt · head 333edb0 · 2026-11-14T18:55Z

review#1 (E1) takes this head.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 333edb086831ca104cb791040018ee46a5ba7809
Local-runs: none
Scope: packages/metadata-protocol/src/protocol-meta-list-reads.ts, packages/objectql/src/package-scoped-exact-qualifier.test.ts, packages/rest/src/meta-disabled-package-doors.test.ts, .changeset/32354-list-doors-disabled-holder.md + packages/metadata-protocol/src/protocol-exact-qualifier.ts (disabledExactAddressHolder, read), @objectstack/metadata-core packageDependencyClosure (read)

Face: narrowing (Clause-②: no (narrowing) on the changeset), with no hits; the whole non-prose diff is in scope. Diff read against merge base 87330e89.

① Derived judgments

  • disabledHolderListing returns undefined, so no list moves, unless the registry can answer and some package is disabled. When it acts, it filters after isItemOfDisabledPackage on the effective and execution lists only. keepDisabledPackages (the package export) and type: package are untouched.
  • Scoped list ('address'): a name is dropped exactly when disabledExactAddressHolder withholds it at that package, the same predicate as the exact read. So ?package=A and ?package=A.custom agree with their 404s, and ?package=DEP keeps its addition (DEP is neither disabled nor a pair).
  • Unscoped list ('unscoped'): an item is dropped when its own bound package's address is withheld (a disabled holder's pair row), or, for a bundle type, when its package is an addition-only holder whose every base in its declared dependency closure is disabled. Holders are read with includeDisabledPackages, so a disable never promotes an addition to a holder. Items with no binding are kept. Answers are memoised per call.
  • Pins: the objectql cases × both registration orders × row saved first or last, with a nothing-disabled CONTROL and the pair's own item of a name A ships nothing of (kept). REST covers the pair's row in four orders, the dependent's addition, and the send naming no package, each with a re-enable CONTROL.
  • CI on this head was still running at review time (12 success, 16 skipped, 20 in progress, none failed). Landing needs all checks green, and the head will move when fix(metadata-protocol)!: the read naming no package withholds a customization pair's row of a name every holder of which is disabled (ADR-0150 D3) #33383 lands (shared test files), which needs a delta record.

② Semver level

Clause-②: no (narrowing), the same arm as #33383 for the by-name read and the right one: nothing an author writes or a caller sends is newly accepted, and lists answer less. (The hand-off message said yes (narrowing); the committed changeset says no (narrowing), which governs.) Metadata-protocol: none, for the same reason ruled on #33383 (record 6882490650). @objectstack/metadata-protocol is patch with the BREAKING banner.

③ Boundary flags

④ Design judgment

The narrowing, judged against the published spec and ADR-0150 D3 on main: a disabled package holds no name, and the by-name doors already withhold what it carries. The lists serving it depended on registration and save order, which contradicted the exact reads. This PR makes the list doors use the exact read's own predicate, so it makes the spec's refusal real rather than taking away a declared capability. The dependent's own address still serves its addition, so nothing a dependent ships becomes unreachable. No must-fix or should-fix; N1–N2 are nits. This is the final round.

Implemented-by: claude/area-E1-32354
Reviewed-by: session_016WV4cwxS1ZpSu2hAMRcqbt

VERDICT: PASS

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

2 participants